package com.learn.springlearn.constant;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

@Data
@AllArgsConstructor
@Builder
public class Reply<T> {

    private Integer code;

    private boolean success;

    private T data;


    public static <T>Reply<T> error(T data){

        return Reply.<T>builder().code(-1).success(false).data(data).build();
    }
}
